Release 10.1A: OpenEdge Development:
ADM and SmartObjects
Using Data SmartLinks
Data in the form of field values is passed from one SmartObject to another using a Data SmartLink. A SmartDataObject can be a Data-Source for another object. It also can be a Data-Target, receiving a key value from another query object to use in opening a query. Visual objects such as SmartDataBrowsers and SmartDataViewers also can be Data-Targets. A SmartDataViewer as a Data-Target receives formatted column values from a SmartDataObject for display. A SmartDataBrowser as a Data-Target browses its Data-Source’s query and displays column values.
At design time, when you drop a SmartObject into an application, the AppBuilder’s Link Advisor assesses each SmartObject already in the application to determine whether it is suitable for a Data link connection with the new SmartObject and, if it is, it recommends the connection. It makes its assessment by examining the properties of each object to determine what columns it defines: a query object can be a Data-Source for another object only if it can supply one or more columns that the object could use as a key to open its own query. In particular:
- A query object can be a Data-Source for a visual object such as a SmartDataViewer if all fields displayed by the SmartDataViewer are in the query object and all fields enabled in the SmartDataViewer can be updated in the Data-source.
Note: Because of the flexibility of SmartObject combinations and the dynamic nature of queries, the Link Advisor might suggest links that are not desirable for your application. Always examine the Link Advisor’s recommendations before accepting them. One way to avoid problems is to drop Data-Sources onto the design window before Data-Targets. When two objects can be linked in either direction, the Link Advisor assumes the first object dropped into the application is the Data-Source.- A SmartDataBrowser can be a Data-Target only for a SmartDataObject with the same signature. For more information on signatures, see the "Compatibility checking" section.
When you are linking two query objects, you can use the SmartDataObject’s
ForeignFieldsproperty at design time to designate which of its fields to use as foreign key fields in SmartDataObjects that are subordinate to it. A corresponding property calledForeignValuesholds the values of those fields for the current row. For details, see the "Initializing the foreign key fields" section.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |